﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace HotelManageSystem.Domain.Infrastructure
{
    /// <summary>
    /// Class Name:     Disposable
    /// Author:         Wenshu Zhang
    /// Creation Date:  2011-12-29
    /// Description:    客户信息
    /// QA:             
    /// -----------------------------------------
    /// </summary>
    public class Disposable:IDisposable
    {
        private bool isDisposed;
        ~Disposable()
        {
            Dispose(false);
        }
        public void Dispose()
        {
            Dispose(true);
            GC.SuppressFinalize(this);
        }
        public void Dispose(bool disposing)
        {
            if (!isDisposed && disposing)
            {
                DisposeCore();
            }
            isDisposed = true;
        }
        //使用virtural 便于继承类的复制（override）操作
        protected virtual void DisposeCore()
        {
        }
    }
}
